import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class AqsConditionQueueTest {

    public static void main(String[] args) {
        ReentrantLock reentrantLock = new ReentrantLock();

        Condition condition = reentrantLock.newCondition();

        Thread t1 = new Thread(new MyConditionAwaitRunnableTask(reentrantLock, condition), "thread1");

        Thread t2 = new Thread(new MyConditionSignalRunnableTask(reentrantLock, condition), "thread2");

        t1.start();

        t2.start();

    }
}
